USE [OHNEW]
GO

/****** Object:  Table [dbo].[D_StorageIn]    Script Date: 12/03/2012 21:31:47 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

SET ANSI_PADDING ON
GO

CREATE TABLE [dbo].[D_StorageIn](
	[ID] [uniqueidentifier] NOT NULL,
	[DocumentDate] [datetime] NOT NULL,
	[DocumentType] [int] NOT NULL,
	[StorageLocation] [uniqueidentifier] NOT NULL,
	[StorageType] [int] NOT NULL,
	[Code] [varchar](50) NOT NULL,
	[Vendor] [uniqueidentifier] NULL,
	[Amount] [decimal](18, 2) NOT NULL,
	[Notes] [varchar](50) NULL,
	[CreatedBy] [uniqueidentifier] NOT NULL,
	[CreateDate] [datetime] NOT NULL,
	[CheckStatus] [int] NOT NULL,
	[CheckedBy] [uniqueidentifier] NULL,
	[CheckDate] [datetime] NULL,
 CONSTRAINT [PK_D_StorageIn] PRIMARY KEY CLUSTERED 
(
	[ID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]

GO

SET ANSI_PADDING OFF
GO

ALTER TABLE [dbo].[D_StorageIn] ADD  CONSTRAINT [DF__D_StorageIn__ID__3CF40B7E]  DEFAULT (newid()) FOR [ID]
GO

ALTER TABLE [dbo].[D_StorageIn] ADD  CONSTRAINT [DF_D_StorageIn_Amount]  DEFAULT ((0)) FOR [Amount]
GO

ALTER TABLE [dbo].[D_StorageIn] ADD  CONSTRAINT [DF_D_StorageIn_Type]  DEFAULT ((0)) FOR [StorageType]
GO

ALTER TABLE [dbo].[D_StorageIn] ADD  CONSTRAINT [DF_D_StorageIn_CheckStatus]  DEFAULT ((0)) FOR [CheckStatus]
GO



